package com.xz.simplerpc.browser;

import java.io.IOException;

/**
 * Created by FangXz on 2017/11/29.
 */
public class BrowserDemo {

    public static void main(String[] args) {
            String str = "cmd /c start C:\\Users\\FangXz\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe www.baidu.com";
            try {
                Runtime.getRuntime().exec(str);
                System.out.println("start browser...");
            } catch (IOException e) {
                e.printStackTrace();
            }

//        try {
//            URI uri = new URI("http://blog.csdn.net/l1028386804");
//            Desktop.getDesktop().browse(uri);
//        } catch (URISyntaxException e) {
//            e.printStackTrace();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
    }
}
